﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace Interface.Core.Controls
{
    public static class Wiki
    {
        public static MvcHtmlString Tab(string tag, string name, string selected)
        { 
            StringBuilder sb = new StringBuilder();

            sb.Append("<div data-options=\"title:'{1}'{2}\">");
            sb.Append("<iframe src=\"/wiki/{0}\"></iframe>");
            sb.Append("</div>");

            string select = tag.Equals(selected) ? ",selected:true" : string.Empty;

            return new MvcHtmlString(string.Format(sb.ToString(), tag, name, select));
        }
    }
}
